<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/8/20
 * Time: 4:45
 */
namespace app\models;
use Yii;
use yii\db\ActiveRecord;

class Mood extends ActiveRecord {
    public $id;
    public $context;
    public $time;

    public static function tableName()
    {
        return 'mood';
    }

    public function rules()
    {
        return [[["context",],"required",],];

    }
    public function scenarios()
    {
        return [
            'addmood' => [ 'context'],
            'updatemood' => ['id','context'],

        ];
    }

}